Repository navigation
Conversation
The confetti behind celebratory modals came from @exercism/active-background, a separate package we no longer want to maintain. Its confetti code now lives in app/javascript/components/modals/confetti/, copied almost unchanged (MIT, Exercism), so the effect looks and moves exactly as before. ConfettiBackground replaces the package's ActiveBackground wrapper. It keeps the old canvas sizing, which ignores devicePixelRatio, because changing it would make the confetti several times denser on retina screens. It now draws nothing when the user prefers reduced motion. Also removes common/Wrapper.tsx, which only Modal.tsx used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The confetti behind celebratory modals comes from
@exercism/active-background(exercism/react-active-background). We don't want to keep maintaining that package, and the website is its only user.We tried
canvas-confetti, which the bootcamp already uses, but it can't draw the curling ribbon streamers and the effect looked clearly different. So this copies the code in instead. It's plain canvas maths with no dependencies and hasn't needed a real change in years.What changes
app/javascript/components/modals/confetti/: the confetti classes (Confetti,ConfettiPaper,ConfettiRibbon,EulerMass,Vector), copied almost unchanged from version 0.6.2 (MIT, Exercism). The only edits are imports and dropping the package's plugin interfaces.ConfettiBackground.tsxreplaces the package'sActiveBackgroundwrapper. It fills the modal overlay, uses the same optionsModal.tsxpassed before, and restarts on resize.devicePixelRatio. Fixing that would make the confetti several times denser on retina screens.@exercism/active-backgrounddependency, andcommon/Wrapper.tsx, which onlyModal.tsxused.Where to check it
Every modal that passes
celebratory:/tracks/:slug/mentoring/testimonials/profiles/:handle/testimonials/about/impact,/about/testimonialsTesting
Once this is merged,
exercism/react-active-backgroundcan be archived.🤖 Generated with Claude Code